package com.lb.thread;

/**
 * @ClassName ThreadDemo1
 * @Author LB
 * @Date 2021/12/21 16:51
 **/
public class ThreadDemo extends Thread{

    private int ticket = 10;

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread()+"卖了一张票,还剩:"+ticket--);
        }
    }
}